package ru.technogeek.labs.dreamnote.theme;

import android.content.Context;

import ru.technogeek.labs.dreamnote.theme.data.FilterDbAdapter;
import ru.technogeek.labs.dreamnote.theme.data.FilterDbAdapter.SortDirection;

public class ThemesManager {
	// Initialize all filters ids
	public static class FilterID {
		public static final int begins = 0x6a050000;
		public static final int created = 0x6a050001;
		public static final int estimate = 0x6a050002;
		public static final int name = 0x6a050003;
		public static final int priority = 0x6a050004;
		public static final int urgency = 0x6a050005;
	}
	
	// Singleton constructor
	private static ThemesManager _instance;
	private ThemesManager(){
		currentTheme = new Theme();
	}
	
	public static ThemesManager getInstance() {
		if(_instance == null){
			_instance = new ThemesManager();
		}
		return _instance;
	}
	
	private Theme currentTheme;
	public Theme getCurrentTheme() {
		return currentTheme;
	}
	
	// Read theme
	public void readTheme(Context context) {
	//TODO; read theme	
		currentTheme.addFilter(new FilterDbAdapter(context, "Begins", FilterID.begins, SortDirection.DOWN));
		currentTheme.addFilter(new FilterDbAdapter(context, "Created", FilterID.created, SortDirection.DOWN));
		currentTheme.addFilter(new FilterDbAdapter(context, "Estimate", FilterID.estimate, SortDirection.DOWN));
		currentTheme.addFilter(new FilterDbAdapter(context, "Prioriy", FilterID.priority, SortDirection.DOWN));

	}	
}